#include "widget.h"
#include "ui_widget.h"

Widget::Widget(QWidget *parent)
    : QWidget(parent)
    , ui(new Ui::Widget)
{
    ui->setupUi(this);
}

Widget::~Widget()
{
    delete ui;
}


void Widget::on_pushButton_clicked()
{

QString filename = ":/level2.mid";
        //"F:/sound/level0.mid";
    QString midiOutName = "";
    QMidiFile* midi_file = new QMidiFile();


    midi_file->load(filename);

    QMidiOut* midi_out = new QMidiOut();
    midi_out->connect(midiOutName);

    MidiPlayer* p = new MidiPlayer(midi_file, midi_out);
    //QObject::connect(p, SIGNAL(finished()), &a, SLOT(quit()));
    p->start();


}





void Widget::on_pushButton_2_clicked()
{

}


void Widget::on_pushButton_3_clicked()
{

}


void Widget::on_pushButton_4_clicked()
{

}

